import java.util.Scanner;

public class C_1097 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[][] a = new int[100][100];
        int i,j;
        while (sc.hasNextInt()) {
            int step = sc.nextInt();
            int num = 0;
            for (int t = 0; t < step; t++) {
                i = t;
                while (true) {
                    j = t - i;
                    num++;
                    a[i][j] = num;
                    if (i == 0)
                        break;
                    i--;
                }
                a[0][0] = 1;
            }
            for (int k = 0; k < step; k++) {
                for (int l = 0; l < step; l++) {
                    if (a[k][l] != 0)
                        System.out.print(a[k][l] + " ");
                }
//                System.out.print('\b');
                System.out.println();
            }
        }
    }
}
